<?php

namespace Application\Form;

use Zend\Form\Form;
use \Application\Filter\AuthFilter;

class AuthForm extends Form {

    public function __construct($name = null) {
        parent::__construct('autenticacao');

        $this->setAttribute('method', 'post');
        $this->setInputFilter(new AuthFilter());

        $this->add(array(
            'name' => 'noLogin',
            'options' => array(
                'type' => 'text'
            ),
            'attributes' => array(
                'placeholder' => 'Usuário',
                'maxlength' => '45',
            	'class' => 'form-control',
            	'autofocus' => true,
            	'required' => true
            )
        ));
        $this->add(array(
            'name' => 'noSenha',
            'options' => array(
                'type' => 'Password'
            ),
            'attributes' => array(
                'type' => 'password',
            	'class' => 'form-control',
                'placeholder' => 'Senha',
            	'required' => true
            )
        ));
        $this->add(array(
            'name' => 'stLembreme',
            'type' => 'Zend\Form\Element\Checkbox',
        	'options' => array(
        		'label' => 'Lembre-me'
        	),
        	'attributes' => array(
        		'value' => 'Lembre-me'
        	)
        ));

        $this->add(array(
            'name' => 'submit',
            'type' => 'Zend\Form\Element\Submit',
            'attributes' => array(
                'value' => 'Login',
                'class' => 'btn btn-lg btn-primary btn-block'
            )
        ));
        
    }

}
